<%@page import="com.entity.Task"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<head>

<title>项目管理系统</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<script type="text/javascript"
	src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<style type="text/css">
#div1 {
	padding-top: 70px;
}

body {
	background-color: #cff;
}
</style>
<script type="text/javascript">
	$(function() {
		$(".progress").click(function(e) {
			var x = Math.round((e.offsetX / this.offsetWidth) * 100);
			$(this).children(".class").css("width", x + "%").text("当前任务完成"+ x + "%");
		});
	});
</script>
</head>

<body class="body">

	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a class="brand" href="#">项目管理系统</a>
			</div>
		</div>
	</div>

	<div id="div1">
		<div class="container">

			<div class="row">
				<div class="span3">
					<div style="padding: 8px 0;" class="well">
						<ul class="nav nav-list">
							<li class="nav-header">${ep.project.name}</li>
							<li class="divider"></li>
							<li><a href="adminmain.jspx?id=${ep.project.id}"><i
									class="icon-home"></i>最新动态</a></li>
							<li class="active"><a href="#"><i
									class="icon-white icon-flag"></i>目标</a>
							</li>
							<li><a href="#"><i class="icon-folder-open"></i>资料库</a></li>
							<li><a href="#"><i class="icon-file"></i>文件共享</a></li>
							<li><a href="#"><i class="icon-user"></i>联系人</a></li>
							<li><a href="#"><i class="icon-fire"></i>想法</a></li>

							<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
							<li><a href="#"><i class="icon-cog"></i>项目设置</a></li>
						</ul>
					</div>
				</div>
				<div class="span9">

					<ul class="breadcrumb"
						style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
						<li class="active"><a href="javascript:;"><i
								class="icon-th"></i><%=session.getAttribute("name")%></a>
						</li>

						<li style="float:right"><i class="icon-edit"></i><a
							href="editGoal.jspx" class="link-black">编辑</a>
						</li>
						<p><%=session.getAttribute("desc")%></p>
					</ul>
					<div class="wall">
						<p></p>
						
							<div class="progress progress-danger" >
								<div class="bar" style="width: 60%;">当前目标总进度完成60%</div>
							</div>
						
						<div class="page-header">
							<a href="addTk.jspx?id=<%=session.getAttribute("id")%>"
								class="btn btn-success"><i class="icon-plus icon-white"></i>添加新任务</a>
						</div>
						<c:if test="${fn:length(taskList) == 0 }">
							<span style="color:blue;font-size:20px">该目标没有任何任务！</span>
						</c:if>
						
						<c:forEach items="${taskList}" var="r">
						<div>
							<dl>
								<dt>
									<i class="icon-bookmark"></i>
										<a href="editTk.jspx?id=${r.getId()}">${r.getName()}</a>&nbsp;&nbsp;&nbsp;[<%=session.getAttribute("name")%>]
								</dt>
								<dd>${r.getDesc()}</dd>
								<div class="progress">
									<div  class="bar class" style="width:${r.rale}%;">当前任务完成度${r.rale}%</div>
								</div>
								
							</dl>
						</div>
						</c:forEach>

					</div>

				</div>

			</div>
		</div>
	</div>

</body>

</html>
